<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('VIEW列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            码商代理：<select name="userId">
                            <option value=""></option>
                            <option th:each="user1:${channels}" th:value="${user1.userId}" th:text="${user1.userName}"></option>
                        </select>
                        </li>
                        <li>
                            支付类型：<select id="payType" name="payType">
                            <option value="">所有</option>
                            <option th:each="dict : ${payerPayTypes}" th:text="${dict.payLabel}"
                                    th:value="${dict.payType}"></option>
                        </select>
                        <li>
                            收款账号：<input type="text" name="account"/>
                        </li>
                        <li class="select-time">
                            <label>统计时间：</label>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                   name="params[beginTime]"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                   name="params[endTime]"/>
                        </li>
                        <li>
                            <a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-success btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.table.exportExcel()"
               shiro:hasPermission="channel:vwChannelQrCashHourStat:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('channel:vwChannelQrCashHourStat:edit')}]];
    var removeFlag = [[${@permission.hasPermi('channel:vwChannelQrCashHourStat:remove')}]];
    var prefix = ctx + "channel/vwChannelQrCashHourStat";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "vwChannelQrCashHourStat",
            sortName: "createTime",
            sortOrder: "desc",
            showExport: true,
            columns: [
                {
                    field: 'channelUserName',
                    title: '码商代理',
                    sortable: true
                },
                {
                    field: 'account',
                    title: '收款账号',
                    sortable: true
                },
                {
                    field : 'payType',
                    title : '支付类型',
                    visible: false
                },
                {
                    field : 'payLabel',
                    title : '支付类型',
                    sortable: true
                },
                {
                    field: 'createTime',
                    title: '统计时间',
                    sortable: true
                },
                {
                    field: 'account',
                    title: '交易账号',
                    sortable: true
                },
                {
                    field: 'accountStatus',
                    title: '账号状态'
                },
                {
                    field: 'sjjeSum',
                    title: '收款金额',
                    sortable: true
                },
                {
                    field: 'receiveSuccessSum',
                    title: '收款成功次数',
                    sortable: true
                },
                {
                    field: 'receiveSum',
                    title: '收款数',
                    sortable: true
                },
                {
                    field: 'sucessRate',
                    title: '成功率',
                    sortable: true
                }]
        };
        $.table.init(options);
    });
    // window.setInterval(function(){
    //     $.table.refresh();
    // }, 5000)
</script>
</body>
</html>